package net.lahuobao.finance.dao;

import net.lahuobao.finance.entity.accredit.AccreditApplyInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface AccreditApplyInfoMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(AccreditApplyInfo record);

    int insertSelective(AccreditApplyInfo record);

    AccreditApplyInfo selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(AccreditApplyInfo record);

    int updateByPrimaryKey(AccreditApplyInfo record);

    int countByOrganizationId(@Param("organizationId") Integer organizationId);

    /***
     *
     * 统计各个状态的记录数据
     *
     * @param organizationId
     * @return
     */
    Map<String,Object> sumQuotaApplicationRecoed(@Param("organizationId") Integer organizationId);


    /***
     *
     * @param organizationId
     * @return
     */
    AccreditApplyInfo selectByOrganizationId(@Param("organizationId") Integer organizationId);


    /****
     *
     * 审核记录
     *
     * @param accreditApplyInfo
     * @return
     */
    int quotaAuditRecord(AccreditApplyInfo accreditApplyInfo);
}